<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="common::header">
	<script src="../../static/plugin/iconPicker/iconPicker.js"></script>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header t-title layui-bg-cyan mlk-title">权限菜单管理</div>
				<div class="layui-card-body">
					<table id="acl-table" class="layui-table" lay-filter="acl-table"></table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<!-- 新增表单内容 -->
<div class="layui-fluid mlk-hide" id="addAcl">
	<form class="layui-form layui-form-pane" method="post" lay-filter="addFormFilter" id="addFormFilter">
		<div class="layui-form-item">
			<label class="layui-form-label">权限名称</label>
			<div class="layui-input-block">
				<input type="text" name="name" required  lay-verify="required" placeholder="请输入权限名称" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">权限类型选择框</label>
			<div class="layui-input-block">
				<select name="type" lay-verify="required" lay-filter="add_select">
					<option value="0">目录</option>
					<option value="1">菜单</option>
					<option value="2">权限</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item" id="add_icon">
			<label class="layui-form-label">目录图标</label>
			<div class="layui-input-block">
				<input type="text" id="iconPicker" name="icon" lay-filter="iconPicker" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">选择父级(默认为目录)</label>
			<div class="layui-input-block">
				<a href="#" class="layui-btn" id="aclSelect"><span>默认为目录</span></a>
				<input type="hidden" name="parentId" id="parentId">
			</div>
		</div>
		<div class="layui-form-item mlk-hide" id="add_url">
			<label class="layui-form-label">url</label>
			<div class="layui-input-block">
				<input type="text" name="url"  placeholder="请输入url" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item mlk-hide" id="add_aclDesc">
			<label class="layui-form-label">权限标识符</label>
			<div class="layui-input-block">
				<input type="text" name="aclDesc"  placeholder="请输入权限标识符" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">展示顺序</label>
			<div class="layui-input-block">
				<input type="text" name="seq" required  lay-verify="required" placeholder="请输入展示顺序" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">备注信息</label>
			<div class="layui-input-block">
				<textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<input type="reset" id="reset" class="mlk-hide">
			<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="*">立即提交</button>
		</div>
	</form>
</div>

<!-- 内容修改 -->
<div class="layui-fluid mlk-hide" id="updateDialog">
	<form class="layui-form layui-form-pane" method="post" lay-filter="updateFormFilter" id="updateFormFilter">
		  <input name="id" type="hidden">
		  <div class="layui-form-item">
		    <label class="layui-form-label">权限名称</label>
		    <div class="layui-input-block">
		      <input type="text" name="name" required  lay-verify="required" placeholder="请输入权限名称" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		<div class="layui-form-item" id="edit_icon">
			<label class="layui-form-label">目录图标</label>
			<div class="layui-input-block">
				<input type="text" id="edit_iconPicker" name="icon" lay-filter="edit_iconPicker" class="layui-input">
			</div>
		</div>
	  <div class="layui-form-item" id="edit_url">
	    <label class="layui-form-label">url</label>
	    <div class="layui-input-block">
	      <input type="text" name="url"  placeholder="请输入url" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item" id="edit_aclDesc">
	    <label class="layui-form-label">权限标识符</label>
	    <div class="layui-input-block">
	      <input type="text" name="aclDesc"  placeholder="请输入权限标识符" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">展示顺序</label>
	    <div class="layui-input-block">
	      <input type="text" name="seq" required  lay-verify="required" placeholder="请输入展示顺序" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">备注信息</label>
	    <div class="layui-input-block">
	      <textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
	    </div>
	  </div>
	</form>
</div>

<!--权限弹出层-->
<div id="uldialog" class="mlk-hide">
	<ul id="ultree"></ul>
</div>
<script type="text/html" id="auth-state">
    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="toolbar">
	<button class="layui-btn" lay-event="add">添加新权限</button>
</script>
<div th:include="common::footer"></div>
<script type="text/javascript" th:src="@{/js/rbac/acl.js}"></script>
<script type="text/javascript" th:src="@{/plugin/iconPicker/iconPicker.js}"></script>
</html>